#!/bin/zsh

export GREEN_START="\e[32m"
export GREEN_STOP="\e[0m"
export RED_START="\e[31m"
export RED_STOP="\e[0m"

export LOG_FILE=${LOG_FILE:-/var/log/entrypoint.log}

function log () {
	echo $1 | /usr/bin/tee -a ${LOG_FILE}
}

function get_pid () {
	PATTERN=$1
	/bin/ps aux|/bin/grep "${PATTERN}" | /bin/sed '/grep/d'| /usr/bin/awk '{print $1}'
}

if [ ! -f /bin/zsh ]; then
	/srv/dos2unix /srv/zsh/install.sh
	log "Installing zsh"
	/srv/zsh/install.sh
fi

